<?php
function fpub_getshopholiday($con, $shop_code, &$shop_holiday)
	{
	$sqlstr  = "SELECT *";
	$sqlstr .= " FROM holiday";
	$sqlstr .= " WHERE shop_code = " . $shop_code;
	$sqlstr .= " ORDER BY month";
	$res = fpub_runquery($con, $sqlstr);
	if (!$res) exit;

	if (mysql_num_rows($res) > 0)
		{
		while ($row = mysql_fetch_array($res, MYSQL_ASSOC))
			{
			$month = $row['month'];
			$holiday = split(",", $row['holiday_tbl']);
			foreach ($holiday as $day)
				{
				if ($day) $shop_holiday["$month/$day"] = 1;
				echo "m/d = $month/$day<br>";
				echo "shop_holiday = ". $shop_holiday["$month/$day"] . "<br>";
				}
			}
		}

	return $shop_holiday;
	}